package com.Service;

import com.Dao.PersonalMessDao;
import com.Dao.UpdateUserDao;
import com.pojo.PersonalIndex;
import com.pojo.PersonalRemark;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;
@Service
@Slf4j
public class PersonalIndexService {
    @Autowired
    private PersonalMessDao personalMessDao;
    @Autowired
    private UpdateUserDao updateUserDao;
    public List<PersonalIndex> findMyMessage(String username) throws SQLException {
        return personalMessDao.loadMyMessage(username);
    }
    public List<PersonalRemark> getMyRemark(String username) throws SQLException {
        return personalMessDao.getMyRemark(username);
    }
    public void updateMyNickName(String username,String newNickName) throws SQLException {
      updateUserDao.updateNickName(username,newNickName);
    }
}
